
<?php echo form_open('lien_he/them_moi', array('id' => 'register')); ?>
<div id="content">
    <?php if ($this->session->flashdata('warning')): ?>
        <div class="affiche_erreur">
            <?php echo $this->session->flashdata('warning'); ?>
        </div>
    <?php endif; ?>
    <div id="title_content">Thêm mới</div>
    <?php echo form_open_multipart('lien_he/them_moi'); ?>
    <table class="form_content" width="100%">

        <tr>
            <td>Tên công ty </td>
            <td>
                <?php if (form_error('ten_cong_ty') != "") {
                    ?> <div class="form_error"><?php echo generate_pure_text(form_error('ten_cong_ty'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="ten_cong_ty" size="35" maxlength="40" value="<?php echo set_value('ten_cong_ty'); ?>" /></td>
        </tr>

        <tr>
            <td>Email </td>
            <td>
                <?php if (form_error('email') != "") {
                    ?> <div class="form_error"><?php echo generate_pure_text(form_error('email'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="email" size="35" maxlength="40" value="<?php echo set_value('email'); ?>" /></td>
        </tr>

        <tr>
            <td>Điện thoại </td>
            <td>
                <?php if (form_error('dien_thoai') != "") {
                    ?> <div class="form_error"><?php echo generate_pure_text(form_error('dien_thoai'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="dien_thoai" size="35" maxlength="40" value="<?php echo set_value('dien_thoai'); ?>" /></td>
        </tr>


        <tr>
            <td colspan="2"><input type="submit" name="submit" value="Thêm mới" class="form_submit" /></td>
        </tr>
    </table>
    <?php echo form_close(); ?>
</div>

<div id="content">
    <div id="title_content">Danh sách liên hệ</div>
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
            <?php echo $this->session->flashdata('error'); ?>
        </div>
    <?php endif; ?>

    <table class="list" width="100%">
        <thead>
            <tr>

                <th>Tên công ty </th>
                <th>Email</th>
                <th>Điện thoại</th>

                <th colspan="2">Action</th>
            </tr>
        </thead>
        <tbody>
            <?php
            if (isset($khachhang_data) && !empty($khachhang_data)):
                foreach ($khachhang_data as $aRow):
                    ?>
                    <tr>
                        <td><?php echo $aRow['ten_cong_ty']; ?></td>
                        <td><?php echo $aRow['email']; ?></td>
                        <td><?php echo $aRow['dien_thoai']; ?></td>

                        <td width="30px"><a href="<?php echo site_url('lien_he/sua_thong_tin/' . $aRow['id']) ?>" title="Sửa"><img src="<?php echo base_url() ?>assets/admin/images/modifier.png" alt="modifier"/></a></td>
                        <td width="30px"><a class="confirm_delete" href="<?php echo site_url('lien_he/xoa_thong_tin/' . $aRow['id']) ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>

                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </tbody>
    </table>
    <?php echo $pagination; ?>



</div>
<!--END content-->